package org.madgecko.basic.service.impl;

import org.madgecko.basic.model.Pager;
import org.madgecko.basic.dao.iface.IClazzDao;
import org.madgecko.basic.model.Clazz;
import org.madgecko.basic.service.iface.IClazzService;
import org.springframework.stereotype.Service;

import javax.inject.Inject;
import java.util.List;

@Service
public class ClazzService implements IClazzService{

	@Inject
	private IClazzDao clazzDao;

	@Override
	public void add(Clazz clazz) {
		clazzDao.add(clazz);
	}

	@Override
	public void delete(Integer id) {
		clazzDao.delete(id);
	}

	@Override
	public void update(Clazz clazz) {
		clazzDao.update(clazz);
	}

	@Override
	public Clazz load(Integer id) {
		return clazzDao.load(id);
	}

	@Override
	public List<Clazz> listInSchoolClazz() {
		return clazzDao.listInSchoolClazz();
	}

	@Override
	public Pager<Clazz> findClazzByCon(Integer status, String con) {
		return clazzDao.findClazzByCon(status, con);
	}
}
